package com.hz.winnie.demands.utils;

import java.security.MessageDigest;

/**
 * @description MD5工具类
 * @author yout.linl
 * @date 2010-12-16
 * @version 1.0
 */
public class MD5Util {

    /**
     * md5加密
     * 
     * @param s
     * @return
     * @throws Exception
     */
    public static String md5(String s) throws Exception {
	MessageDigest md5 = MessageDigest.getInstance("MD5");
	return Base64Util.encodeString(new String(md5.digest(s
		.getBytes("utf-8"))));
    }
}
